using System;
using System.Collections.Generic;
using System.Text;

using View;
using Task;

namespace Presenter
{
    /// <summary>
    /// Map Presenter.
    /// </summary>
    public sealed class MapPresenter
    {
        #region Members

        /// <summary>
        /// View.
        /// </summary>
        private IMapView view;

        /// <summary>
        /// Task.
        /// </summary>
        private MapTask task;

        #endregion Members

        #region Construction/Finalization

        /// <summary>
        /// Initializes a new instance of the <see cref="MapPresenter"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        public MapPresenter(IMapView view)
        {
            this.view = view;
            task = new MapTask();
        }

        #endregion Construction/Finalization

        #region Public Methods

        /// <summary>
        /// Initializes this instance.
        /// </summary>
        public void Initialize()
        {
            view.LocationFrom = task.GetDefaultLocationFrom();

            view.LocationTo = task.GetDefaultLocationTo();

            view.SearchText = task.GetDefaultSearchString();
        }

        #endregion Public Methods
    }
}
